home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / tutor / cptuts22.arj / ELEMLIST.CPP < prev    next >
C/C++ Source or Header  |  1992-01-20  |  582b  |  34 lines

  1.                                     // Chapter 11 - Program 7
  2. #include "elemlist.h"
  3.  
  4.  
  5.  
  6. void
  7. employee_list::add_person(person *new_employee)
  8. {
  9. employee_element *temp;
  10.  
  11.    temp = new employee_element(new_employee);
  12.    if (start == NULL)
  13.       start = end_of_list = temp;
  14.    else {
  15.       end_of_list->next_employee = temp;
  16.       end_of_list = temp;
  17.    }
  18. }
  19.  
  20.  
  21.  
  22.  
  23. void
  24. employee_list::display_list(void)
  25. {
  26. employee_element *temp;
  27.  
  28.    temp = start;
  29.    do {
  30.       temp->employee_data->display();
  31.       temp = temp->next_employee;
  32.    } while (temp != NULL);
  33. }
  34.